1. Field of the Invention
The present invention relates to image blurring, and in particular, to a system and method for creating blur in an image to reduce the depth of field of the image.
2. Description of the Related Art
In digital cameras, the depth of field (hereinafter “DOF”) is typically much greater than for cameras which use film due to the image sensor being somewhat smaller than in a 35 mm film negative. This means that portrait images captured with digital cameras, in particular, will tend to have the background in sharp focus, which is often not desirable as a photographer may wish to emphasize a person's face and de-emphasize the background of the picture. This problem may be corrected by careful photography combined with careful use of camera settings.
Alternatively, portrait images may be blurred semi-manually by professional photographers using desktop computer image processing software after an image has been captured. This involves manual intervention and is often time-consuming. Nonetheless, such conventional blurring software may apply various techniques using convolution kernels to create blurring effects, as illustrated in FIGS. 1 and 2.
Generically, convolution can be expressed according to the equation below:B=I*gwhere B is the blurred image, I is the original image and g is the convolution kernel. Convolution blur may be applied on a pixel-by-pixel basis. So, for a particular pixel with coordinates (x,y), the convolution with a kernel of size (M×N) can be written as:
      B    ⁡          (              x        ,        y            )        =            ∑      j      N        ⁢                  ∑        i        M            ⁢                        I          ⁡                      (                                          x                -                i                            ,                              y                -                j                                      )                          ⁢                  g          ⁡                      (                          i              ,              j                        )                              The size and shape of the kernel influence the blurring result. The size determines the strength of the blur and therefore the perceived depth of the object. The shape determines the visual aspect of the blur and is related to what is called “circle of confusion”.
A circular kernel of a diameter D has the following analytical form
      g    ⁡          (              i        ,        j            )        =      {                                        1                          π              ⁢                                                          ⁢                              D                2                                                                                        if              ⁢                                                          ⁢                                                                    i                    2                                    +                                      j                    2                                                                        ≤            D                                                0                          otherwise                      }  and a geometrical shape of a cylinder or “pillbox”, as is illustrated in FIG. 1. Referring now to FIGS. 2a-2b, the effects of a convolution kernel on a row of pixels within a flash image of a scene are illustrated. The most intense (bright areas) of the original image, i.e., in this example pixels 2 and 4 taken from left to right, undergo saturation clipping to the maximum of the dynamic intensity range (e.g., 255 for 8 bit/pixel image) as depicted by dashed outlines 20, while pixels 1, 3 and 5 are not clipped. Due to convolution, a resulting blurred image lacks the contrast and sharpness present in the scene, therefore creating a less appealing visual effect. Such blurring techniques simply do not achieve realistic results and do not resemble an image with a shallow DOF as desired.